<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .test {
            color: red;
            /* 类选择器的权重为0010 */
        }

        div {
            color: pink !important;
            /* 元素选择器的权重为0001 */
        }

        #demo {
            color: blue;
            /* id选择器的权重为0100 */
        }
    </style>
</head>

<body>
    <div class="test" id="demo" style="color: green;">appreciate v.感激，欣赏</div>
    <!-- 行内选择器1000 -->
</body>

</html>